<include file="public/layout" />
<script src="__PUBLIC__/static/js/layer/laydate/laydate.js"></script>
<style>
    .system_img_location{text-align: center; width: 120px;position:absolute;top:15px; margin-left:265px;}
</style>
<body style="background-color: #FFF; overflow: auto;">
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>修改店铺有效期</h3>
                <h5>修改店铺有效期</h5>
            </div>
            
        </div>
    </div>
    <!-- 操作说明 -->
    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom"><i class="fa fa-lightbulb-o"></i>
            <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
            <span id="explanationZoom" title="收起提示"></span> </div>
        <ul>
            <li>修改店铺使用有效期。</li>
        </ul>
    </div>
    <div id="ajaxwaitid"></div>
    <form method="post" id="handlepost" action="{:U('Admin/editstorefun')}" name="form1">
        <input type="hidden" name="store_id" value="{$list.store_id}" value="ok" />
        <div class="ncap-form-default">
            <dl class="row">
                <dt class="tit">
                    <label for="record_no">店铺名称</label>
                </dt>
                <dd class="opt">
                    <input disabled="disabled" value="{$list.name}" type="text" />
                </dd>
            </dl>
            
            <dl class="row">
            	<dt class="tit">
                    <label for="record_no">有效时间</label>
                </dt>
                <dd class="opt">              	
                	<input type="text" size="30" id="useendtime" name="useendtime" value="{$list['useendtime']}" class="qsbox"  placeholder="有效期至">
                </dd>           	
            </dl>
            
            <div class="bot">
                <a href="JavaScript:void(0);" class="ncap-btn-big ncap-btn-green" onclick="storesave()">确认提交</a>
            </div>
        </div>
    </form>
</div>
<div id="goTop"> <a href="JavaScript:void(0);" id="btntop"><i class="fa fa-angle-up"></i></a><a href="JavaScript:void(0);" id="btnbottom"><i class="fa fa-angle-down"></i></a></div>
</body>
<script type="text/javascript">
	
	$('#useendtime').layDate(); 
	
	function storesave(){
        $('span.err').hide();
        
        
        $.ajax({
            type: "POST",
            url: "{:U('Admin/editstorefun')}",
            data: $('#handlepost').serialize(),
            async:false,
            dataType: "json",
            error: function () {
                layer.alert("服务器繁忙, 请联系管理员!");
            },
            success: function (data) {
                if (data.status == 1) {
                    layer.msg(data.msg, {
                        icon: 1,
                        time: 2000                   
                    },function(){
                        	window.parent.location.href = data.url;
                        	//alert('ends');
                        	//location.href = data.url;
                        });
                } else {
                    layer.msg(data.msg, {icon: 2,time: 3000});
                }
            }
        });
    }
   
</script>
</html>